﻿public class NetHandler_Maintain : NetMessageHandler
{
    public const string Key = "Maintain";

    public static NetHandler_Maintain NewHandler()
    {
        return new NetHandler_Maintain();
    }

    protected override ISerialize NewData() => new MaintainData();

    public override void Execute(Remote client, ISerialize _data)
    {
        MaintainData data = _data as MaintainData;

        GameDebug.Log($"Master  请求维护：{data.content}  end time:{data.maintainEndTime}");

        ResponseData response = new ResponseData();
        response.code = 0;

        Game.instance.data.maintainData = data;

        byte[] senddata = response.Write();

        this.SendResponse(client, Key, this.m_MessageReceived.seq, senddata);
    }
}
